<template>
  <div class="layout-top">
    <el-table v-loading="loading" :data="tableData" style="width: 100%">
      <el-table-column v-for="(item, index) in tableTitle" :label="item.name" :key="index" :width="item.width" :prop="item.name">
        {{item.name}} </el-table-column>
    </el-table>
  </div>
</template>

<script>
export default {
  name: 'TableTemplate',
  props: {
    tableData: Array,
    tableTitle: Array,
  },
  data() {
    return {
      loading:false,
    }
  },
  methods: {},
  created(){
    console.log(this.tableData);
  }
}
</script>
<style lang="scss" scoped></style>

<!--
<template>
  <div>
    <TabTemplate :tableData="info" :tableTitle="title" />
  </div>
</template>
<script>
import TabTemplate from '../../components/common/table_template/TableTemplate'
export default {
  name: '',
  data() {
    return {
      info: [
        {
          date: '2016-05-02',
          name: '王小虎',
          address: '上海市普陀区金沙江路 1518 弄',
        },
        {
          date: '2016-05-04',
          name: '王小虎',
          address: '上海市普陀区金沙江路 1517 弄',
        },
        {
          date: '2016-05-01',
          name: '王小虎',
          address: '上海市普陀区金沙江路 1519 弄',
        },
        {
          date: '2016-05-03',
          name: '王小虎',
          address: '上海市普陀区金沙江路 1516 弄',
        },
      ],
      title: [{ name: '姓名', width: '180' }, { name: '日期' }, { name: '地址' }],
    }
  },
  methods: {},
  components: {
    TabTemplate,
  },
}
</script>
<style lang="scss" scoped></style>
